﻿using MCUPic.ViewModels;
using MCUPic.Core;
using PReactive.Ioc;
using PReactive.Modularity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MCUPic
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            PReactive.PReactiveApp.OnConfigureModuleCatalog += PReactiveApp_OnConfigureModuleCatalog;
            PReactive.PReactiveApp.RunApplication(Register);
        }

        private static void PReactiveApp_OnConfigureModuleCatalog(IModuleCatalog moduleCatalog)
        {
            moduleCatalog.AddModule<ModuleCore>();
        }

        private static void Register(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterMainView<Views.MainView, MainViewModel>();
        }
    }
}
